{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据归一化\n",
    "\n",
    "| |肿瘤大小|发现时间|\n",
    "|:---|:---|:---|\n",
    "|样本1| 1 cm| 200天|\n",
    "|样本2| 5 cm|100天|\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "所有数据映射到同一尺度.\n",
    "\n",
    "### 最值归一化\n",
    "xscale = (x- xmin)/xmax-xmin\n",
    "\n",
    "* 用于分布有明显的边界的情况,受outlier影响较大"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.random.randint(0,100, size=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.05154639, 0.09278351, 0.50515464, 0.57731959, 1.        ,\n",
       "       0.03092784, 0.72164948, 0.79381443, 0.07216495, 0.7628866 ,\n",
       "       1.        , 0.60824742, 0.7628866 , 0.44329897, 0.29896907,\n",
       "       0.4742268 , 0.80412371, 0.49484536, 0.10309278, 0.92783505,\n",
       "       0.07216495, 0.26804124, 0.63917526, 0.18556701, 0.64948454,\n",
       "       0.19587629, 0.91752577, 0.57731959, 0.81443299, 0.27835052,\n",
       "       0.19587629, 0.07216495, 0.46391753, 0.97938144, 0.36082474,\n",
       "       0.91752577, 0.25773196, 0.77319588, 0.53608247, 0.43298969,\n",
       "       0.55670103, 0.71134021, 0.06185567, 0.29896907, 0.93814433,\n",
       "       0.49484536, 0.2371134 , 0.40206186, 0.55670103, 0.43298969,\n",
       "       0.26804124, 0.39175258, 0.97938144, 0.7628866 , 0.25773196,\n",
       "       0.70103093, 0.6185567 , 0.03092784, 0.        , 0.31958763,\n",
       "       0.40206186, 0.08247423, 0.44329897, 0.81443299, 0.86597938,\n",
       "       0.48453608, 0.53608247, 0.6185567 , 0.67010309, 0.6185567 ,\n",
       "       0.80412371, 0.72164948, 0.06185567, 0.36082474, 0.55670103,\n",
       "       0.77319588, 0.1443299 , 0.25773196, 0.43298969, 0.28865979,\n",
       "       0.34020619, 0.72164948, 0.17525773, 0.27835052, 0.53608247,\n",
       "       0.08247423, 0.83505155, 0.21649485, 0.29896907, 0.13402062,\n",
       "       0.95876289, 0.54639175, 0.72164948, 0.92783505, 0.43298969,\n",
       "       0.16494845, 0.39175258, 0.16494845, 0.8556701 , 0.87628866])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(x - np.min(x))/(np.max(x) - np.min(x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.random.randint(0,100,(50,2))\n",
    "X = np.array(X, dtype=float)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "X[:,0] = (X[:,0]- np.min(X[:,0]))/(np.max(X[:,0])-np.min(X[:,0]))\n",
    "X[:,1] = (X[:,1]- np.min(X[:,1]))/(np.max(X[:,1])-np.min(X[:,1]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAVhElEQVR4nO3dbYxcV3nA8f+DIeCWl62wUWHtYKM6ERH5YLoKVJYKiJeYVIqjKIWkQqVVRAQtVIg2lRFVioJQXFDLixQBLop4kSAJCJkVMQoqBoEQod7IKRAjV655yW5QY2icLxiS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8HHhh4v9zfNvKYzHwceAR4bi2lK1eRug66nt5f/LZas74RsRPYmplfqbNgFSlyfi8CLoqI70TEPRGxu7bSla9Ifd8LvCkiluktdfmOeorWiPX+vtel0JqiU2BUS3s437LIMW1QuB4R8SZgAXhFpSWq1qr1jYinAB8C/qquAlWsyPl9Kr1hl1fS6319OyJekpmnKi5bFYrU9zrgU5n5rxHxJ8Bn+/X9XfXFq12lcaotLfRlYOvA+y2c2y174piIeCq9rttqXZ9pVaSuRMRrgPcAV2bmb2oqWxXWqu+zgJcA34yIn9Abd1xs8Y3RotfylzPzscz8MXCMXoBvoyL1vR64EyAzvws8g96DrLqo0O/7fLUloB8GdkTE9oi4gN5Nz8WhYxaBN/dfXwMcyv5diJZZs679IYhP0AvmbR5fhTXqm5mPZOamzNyWmdvo3TO4MjOXminuxIpcywfo3fgmIjbRG4I5UWspy1Okvj8DXg0QES+mF9BP1lrK+iwCf9nPdnk58Ehm/ry0T2/6rvA67h5fAfw3vTvm7+lvu5nejxt6F8EXgOPAfwIvarrMFdb1P4D/Be7r/1tsusxV1nfo2G/S4iyXguc3gH8DjgI/AK5tuswV1/cS4Dv0MmDuA17XdJknqOvngZ8Dj9FrjV8PvBV468C5vbX//+IHZV/LTv2XpI5oy5CLJGkNBnRJ6ggDuiR1hAFdkjrCgC5JHWFAl6SOMKBLUkf8P3ODXMB9sHbTAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[:,0],X[:,1]) # 归一化进1\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 均值方差归一化\n",
    "\n",
    "* 数据分布没有明显的边界,有可能存在极端数据值\n",
    "\n",
    "\n",
    "把所有的数据诡异到均值为0方差为1的分布中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.random.randint(0,100,(50,2))\n",
    "X = np.array(X, dtype=float)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "X[:,0] = (X[:,0] - np.mean(X[:,0]))/np.std(X[:,0])\n",
    "X[:,1] = (X[:,1] - np.mean(X[:,1]))/np.std(X[:,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD4CAYAAADvsV2wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAXq0lEQVR4nO3df6zddX3H8efL8uvGGS/Yq9ALtZA1nXOdFk8Y2MQwfqxIFlqrRlwyYcM0TInbshDrSNzCP60j2RIVf1QlwuIQp1LrwFWwEhYnjFtbKKV2VCLh3nZwRcEZG0bhvT/O98rhcs6559zv93x/vh7JSc8532/P593vOXn38/1835/PVxGBmZnV36uKDsDMzPLhhG9m1hBO+GZmDeGEb2bWEE74ZmYNcVzRAfSzdOnSWLFiRdFhmJlVxu7du38WERPdtpU64a9YsYKpqamiwzAzqwxJj/fa5iEdM7OGcMI3M2sIJ3wzs4ZwwjczawgnfDOzhnDCNzNriFKXZZqZNcX2PTPcsPMgh585yrLxMa5dt4oNayYzbcMJ38ysYNv3zPCxb+7j6PMvADDzzFE+9s19AJkmfQ/pmJkV7IadB3+T7Occff4Fbth5MNN2nPDNzAp2+JmjQ72/WE74ZmYFWzY+NtT7i5U64Us6Q9L3JR2QtF/SX3bZR5I+KemQpIcknZ22XTOzurh23SrGjl/ysvfGjl/CtetWZdpOFhdtjwF/ExE/kvQaYLekuyLikY593gmsTB5/AHw2+bMW8ri6bmb1NZcvSl+lExFHgCPJ8/+VdAC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     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[:,0],X[:,1]) # 归一化进1\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "## 测试数据集归一化,要用 训练数据集归一化的内容归一化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
